// Crypto
var crypto = require('crypto');



var encrypt = exports.encrypt = function(password,callback) {
	salt = crypto.randomBytes(256).toString('base64');
	crypto.pbkdf2(password, salt, 15000, 256, function(err,derivedKey) {
		hash = derivedKey.toString('base64');
		callback(hash,salt); // "It's Good" - Frederik 2k14 // bad commenting 
	});
	
	
}



var checkEncrypt = exports.checkEncrypt = function(password,salt,callback) {
	crypto.pbkdf2(password, salt, 15000, 256, function(err,derivedKey) {
		hash = derivedKey.toString('base64');
		callback(hash); // "It's Good" - Frederik 2k14 // bad commenting // did he just comment a comment?
	});
	
	
}



function check(pass,salt,hash) {
	
	crypto.pbkdf2(pass, salt, 15000, 256, function(err,derivedKey) {
	c_hash = derivedKey.toString('base64');
	
	});
}

